home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / cattool / cntnts20.zip / CONTENTS.BAT < prev    next >
DOS Batch File  |  1990-01-18  |  2KB  |  71 lines

  1. echo off
  2. cls
  3. echo List the Filenames of a Selected Disk to CONTDISK/FILE.SRT on Specified Disk/DIR
  4. echo.
  5. if not x==%1x goto GO
  6. echo TYPE: "%0" followed by [Drive:] [Diskname] [Location for CONTENTS files]
  7. echo NOTE:  Diskname MUST be from five to seven (5-7) characters long,  and contain
  8. echo        NO spaces to insure proper sorting.  (i.e. "a: A0001 c:\list")
  9. goto END
  10. :GO
  11. echo You have indicated the Directory of %1 to be named "%2" and
  12. echo CONTENTS Files to be written on Drive %3.  Is this correct?
  13. elf
  14. if errorlevel 255 goto END
  15. echo.
  16. echo Do you wish to View Directory of %1 ?
  17. elf
  18. if errorlevel 255 goto :LABEL
  19. dir/p %1
  20. :LABEL
  21. echo.
  22. echo Do you wish to LABEL disk in Drive %1 ?
  23. elf
  24. if errorlevel 255 goto :CONT
  25. vl %1
  26. :CONT
  27. echo.
  28. echo Do you want to CONTINUE ?
  29. elf
  30. if errorlevel 255 goto :END
  31. echo.
  32. echo Updating/writing %3\CONTENTS.LST.  Please wait . . .
  33. cd %1
  34. %1\
  35. for %%f in (*.*) do echo %2 %4 %5 %%f >> %3\contents.lst
  36. C:
  37. CD\
  38. echo.
  39. echo View current CONTENTS.LST in Drive %3 ?
  40. elf
  41. if errorlevel 255 goto :SORT
  42. list %3\contents.lst
  43. :SORT
  44. echo.
  45. echo Sort CONTENTS.LST by Diskname and Filename?
  46. elf
  47. if errorlevel 255 goto :NAM
  48. echo Sorting CONTENTS.LST. Writing CONTDISK.SRT and CONTFILE.SRT.  Please wait . . .
  49. sort /+8 < %3\contents.lst > %3\contfile.srt
  50. sort /+1 < %3\contents.lst > %3\contdisk.srt
  51. echo.
  52. echo Do you wish to Columnize CONTFILE.SRT?
  53. elf
  54. if errorlevel 255 goto :NAM
  55. cd %3
  56. %3\
  57. xup
  58. C:
  59. CD\
  60. :NAM
  61. echo.
  62. echo Do you wish to Columnize CONTDISK.SRT?
  63. elf
  64. if errorlevel 255 goto :END
  65. cd %3
  66. %3\
  67. xup
  68. C:
  69. CD\
  70. :END
  71.